<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>添加出装</title>
</head>
<body>
<form class="layui-form" lay-filter="layui-form">
    <div class="mainBox">
        <div class="main-container">

            <div class="layui-form-item">
                <label class="layui-form-label">
                    <text title="必填项" style="color:red;">*</text>
                    所属英雄</label>
                <div class="layui-input-block">
                    <div class="xmSelect"
                         data-name="hero_id"
                         data-sourceType="route"
                         data-source="/admin.wz.hero/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                         data-layVerify="required"
                    ></div>
                </div>
            </div>

            <div class="layui-form-item">
                <blockquote class="layui-elem-quote">推荐出装</blockquote>
                <label class="layui-form-label">
                    <text title="必填项" style="color:red;">*</text>
                    推荐方案</label>
                <div class="layui-input-block">
                    <div class="xmSelect"
                         data-name="sort"
                         data-sourceType="data"
                         data-radio="true"
                         data-max="2"
                         data-source="[{name:'1',value:'1'},{name:'2',value:'2'},{name:'3',value:'3'},{name:'4',value:'4'}]"
                         data-layVerify="required"
                    ></div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">
                    <text title="必填项" style="color:red;">*</text>
                    标语</label>
                <div class="layui-input-block">
                    <div class="xmSelect"
                         data-name="label_id"
                         data-sourceType="route"
                         data-source="/admin.wz.label/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                         data-layVerify="required"
                    ></div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">
                    <text title="必填项" style="color:red;">*</text>
                    召唤师技能</label>
                <div class="layui-input-block">
                    <div class="xmSelect"
                         data-name="sum_skill_id"
                         data-sourceType="route"
                         data-source="/admin.wz.sumskill/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                         data-layVerify="required"
                    ></div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">
                    技能加点</label>
                <div class="layui-input-block">
                    <input type="text" name="skill_priority" autocomplete="off" placeholder="请输入技能加点"
                           class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">
                    <text title="必填项" style="color:red;">*</text>
                    核心装备</label>
                <div class="layui-input-inline">
                    <div class="xmSelect"
                         data-name="master_recommend_id"
                         data-sourceType="route"
                         data-source="/admin.wz.programme/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                    ></div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">
                    <text title="必填项" style="color:red;">*</text>
                    推荐装备</label>
                <div class="layui-input-inline">
                    <div class="xmSelect"
                         data-name="recommend_equipment1"
                         data-sourceType="route"
                         data-source="/admin.wz.programme/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                    ></div>
                    <div class="xmSelect"
                         data-name="recommend_equipment3"
                         data-sourceType="route"
                         data-source="/admin.wz.programme/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                    ></div>
                    <div class="xmSelect"
                         data-name="recommend_equipment5"
                         data-sourceType="route"
                         data-source="/admin.wz.programme/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                    ></div>
                </div>
                <div class="layui-input-inline">
                    <div class="xmSelect"
                         data-name="recommend_equipment2"
                         data-sourceType="route"
                         data-source="/admin.wz.programme/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                    ></div>
                    <div class="xmSelect"
                         data-name="recommend_equipment4"
                         data-sourceType="route"
                         data-source="/admin.wz.programme/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                    ></div>
                    <div class="xmSelect"
                         data-name="recommend_equipment6"
                         data-sourceType="route"
                         data-source="/admin.wz.programme/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                    ></div>
                </div>
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label">
                    <text title="必填项" style="color:red;">*</text>
                    出装顺序</label>
                <div class="layui-input-inline">
                    <div class="xmSelect"
                         data-name="equipment_sort1"
                         data-sourceType="route"
                         data-source="/admin.wz.programme/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                    ></div>
                    <div class="xmSelect"
                         data-name="equipment_sort5"
                         data-sourceType="route"
                         data-source="/admin.wz.programme/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                    ></div>
                    <div class="xmSelect"
                         data-name="equipment_sort9"
                         data-sourceType="route"
                         data-source="/admin.wz.programme/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                    ></div>
                </div>
                <div class="layui-input-inline">
                    <div class="xmSelect"
                         data-name="equipment_sort2"
                         data-sourceType="route"
                         data-source="/admin.wz.programme/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                    ></div>
                    <div class="xmSelect"
                         data-name="equipment_sort6"
                         data-sourceType="route"
                         data-source="/admin.wz.programme/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                    ></div>
                    <div class="xmSelect"
                         data-name="equipment_sort10"
                         data-sourceType="route"
                         data-source="/admin.wz.programme/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                    ></div>
                </div>
                <div class="layui-input-inline">
                    <div class="xmSelect"
                         data-name="equipment_sort3"
                         data-sourceType="route"
                         data-source="/admin.wz.programme/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                    ></div>
                    <div class="xmSelect"
                         data-name="equipment_sort7"
                         data-sourceType="route"
                         data-source="/admin.wz.programme/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                    ></div>
                    <div class="xmSelect"
                         data-name="equipment_sort11"
                         data-sourceType="route"
                         data-source="/admin.wz.programme/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                    ></div>
                </div>
                <div class="layui-input-inline">
                    <div class="xmSelect"
                         data-name="equipment_sort4"
                         data-sourceType="route"
                         data-source="/admin.wz.programme/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                    ></div>
                    <div class="xmSelect"
                         data-name="equipment_sort8"
                         data-sourceType="route"
                         data-source="/admin.wz.programme/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                    ></div>
                    <div class="xmSelect"
                         data-name="equipment_sort12"
                         data-sourceType="route"
                         data-source="/admin.wz.programme/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                    ></div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">
                    <text title="必填项" style="color:red;">*</text>
                    铭文</label>
                <div class="layui-input-inline">
                    <div class="xmSelect"
                         data-name="inscriptions1"
                         data-sourceType="route"
                         data-source="/admin.wz.inscription/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                    ></div>
                </div>
                <div class="layui-input-inline">
                    <label class="layui-form-label">
                        数量</label>
                    <div class="layui-input-block" style="width: 100px">
                        <input type="text" name="inscriptions1_num" autocomplete="off" placeholder="个数"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label"></label>
                <div class="layui-input-inline">
                    <div class="xmSelect"
                         data-name="inscriptions2"
                         data-sourceType="route"
                         data-source="/admin.wz.inscription/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                    ></div>
                </div>
                <div class="layui-input-inline">
                    <div class="layui-input-block" style="width: 100px">
                        <input type="text" name="inscriptions2_num" autocomplete="off" placeholder="个数"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label"></label>
                <div class="layui-input-inline">
                    <div class="xmSelect"
                         data-name="inscriptions3"
                         data-sourceType="route"
                         data-source="/admin.wz.inscription/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                    ></div>
                </div>
                <div class="layui-input-inline">
                    <div class="layui-input-block" style="width: 100px">
                        <input type="text" name="inscriptions3_num" autocomplete="off" placeholder="个数"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label"></label>
                <div class="layui-input-inline">
                    <div class="xmSelect"
                         data-name="inscriptions4"
                         data-sourceType="route"
                         data-source="/admin.wz.inscription/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                    ></div>
                </div>
                <div class="layui-input-inline">
                    <div class="layui-input-block" style="width: 100px">
                        <input type="text" name="inscriptions4_num" autocomplete="off" placeholder="个数"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label"></label>
                <div class="layui-input-inline">
                    <div class="xmSelect"
                         data-name="inscriptions5"
                         data-sourceType="route"
                         data-source="/admin.wz.inscription/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                    ></div>
                </div>
                <div class="layui-input-inline">
                    <div class="layui-input-block" style="width: 100px">
                        <input type="text" name="inscriptions5_num" autocomplete="off" placeholder="个数"
                               class="layui-input">
                    </div>
                </div>
            </div>


            <div class="layui-form-item">
                <div class="layui-input-inline">
                    <label class="layui-form-label">
                        <text title="必填项" style="color:red;">*</text>
                        出装说明</label>
                    <div class="layui-input-block" style="width: 400px">
                            <textarea name="description" placeholder="请输入出装说明" class="layui-textarea"
                                      lay-verify="remark"></textarea>
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-inline">
                    <label class="layui-form-label">
                        <text title="必填项" style="color:red;">*</text>
                        铭文说明</label>
                    <div class="layui-input-block" style="width: 400px">
                            <textarea name="recommend_reason" placeholder="请输入铭文说明" class="layui-textarea"
                                      lay-verify="remark"></textarea>
                    </div>
                </div>
            </div>


        </div>
    </div>
    <div class="bottom">
        <div class="button-container">
            <button type="submit" class="laytp-btn laytp-btn-primary laytp-btn-sm" lay-submit="" lay-filter="add">
                <i class="layui-icon layui-icon-ok"></i>
                提交
            </button>
            <button type="reset" class="laytp-btn laytp-btn-sm">
                <i class="layui-icon layui-icon-refresh"></i>
                重置
            </button>
        </div>
    </div>
</form>
<script>
    if (localStorage.getItem("staticDomain")) {
        document.write("<link rel='stylesheet' href='" + localStorage.getItem("staticDomain") + "/component/layui/css/layui.css?v=" + localStorage.getItem("version") + "'>");
        document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/layui/layui.js?v=" + localStorage.getItem("version") + "'><\/script>");
        document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/laytp/layuiConfig.js?v=" + localStorage.getItem("version") + "'><\/script>");
    } else {
        document.write("<link rel='stylesheet' href='/static/component/layui/css/layui.css?v=" + localStorage.getItem("version") + "'>");
        document.write("<script src='/static/component/layui/layui.js?v=" + localStorage.getItem("version") + "'><\/script>");
        document.write("<script src='/static/component/laytp/layuiConfig.js?v=" + localStorage.getItem("version") + "'><\/script>");
    }
</script>
<script>
    layui.use(['laytp'], function () {
        //获取参数ID
        layui.form.on('submit(add)', function (data) {
            var btnAnim = layui.button.load({elem: $(this)});
            facade.ajax({
                route: '/admin.wz.programme/add',
                data: data.field
            }).done(function (res) {
                if (res.code === 0) {
                    parent.layui.layer.close(parent.layui.layer.getFrameIndex(window.name));//关闭当前页
                    parent.layui.table.reload("laytp-table");
                }
                btnAnim.stop();
            }).fail(function () {
                btnAnim.stop();
            });
            return false;
        });
    })
</script>
</body>
</html>